﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Scheduling.Models.Interfaces
{
    public interface IRoomLoader
    {
        /// <summary>
        /// Retrieve the rooms from the database based on specified parameters. 
        /// </summary>
        /// <param name="LoadingFlags">The flags for which optional attributes you want to load. </param>
        /// <returns>List of rooms. </returns>
        List<Room> GetRooms();

        /// <summary>
        /// Checks if a room exists in the database. 
        /// </summary>
        /// <param name="RoomID">The ID of the room. </param>
        /// <returns>True if it exists. Otherwise False. </returns>
        bool RoomExists(string RoomID);

        /// <summary>
        /// Retrieve a single room from the database. 
        /// </summary>
        /// <param name="RoomID">The ID of the room. </param>
        /// <returns>The requested room. </returns>
        Room GetRoom(string RoomID);

        /// <summary>
        /// Searches for the room on room name or id, from the pattern provided.
        /// </summary>
        /// <param name="Pattern"></param>
        /// <returns>List</returns>
        List<Room> SearchRoomsByPatten(string Pattern);

        /// <summary>
        /// Delete room from database. 
        /// </summary>
        /// <param name="RoomID">The ID of the room. </param>
        void DeleteRoom(string RoomID);

        /// <summary>
        /// Add room into database
        /// </summary>
        /// <param name="room">The room to be inserted into database. </param>
        void InsertRoom(Room room);

        /// <summary>
        /// Edit room in database. 
        /// </summary>
        /// <param name="room">A room with the same roomID must exist in database </param>
        void EditRoom(Room room);

        /// <summary>
        /// Removes all rooms.
        /// </summary>
        void Clear();
    }
}